<?php
function smarty_function_lang($params, $smarty)
{
	if(!isset($params['name']))
	{
		return "[lang error: argument \"name\" was not set!]";
	}
	
	
	$local = Yomm_Library_Localization::getInstance($_SESSION['i18n']);
	
	
	if(isset($params['args']))
	{
		return call_user_func_array(array($local, $params['name']), explode(";",$params['args']));
		
	} else {
		return $local->{$params['name']}();
	}
	
}